﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Dycox.Workflows
{
    internal class AbortProcessContext : WorkflowExecutionContext
    {
        public AbortProcessContext(Workflow workflow, OperationArguments args)
            : base(workflow, args)
        {

        }

        protected override IWorkflowComponent GetContextComponent()
        {
            return DataProvider.GetComponent(Arguments.ComponentID, true);
        }

        public string Reason
        {
            get { return Arguments.Comment; }
        }

        protected override bool AllowsNonExclusiveMode
        {
            get
            {
                return true;
            }
        }
    }
}
